package com.oig.base.api.fallback;

import com.oig.base.api.CountryService;
import com.oig.common.module.SysRequest;
import com.oig.sys.base.dto.CountryDto;
import com.oig.sys.base.vo.CountryVo;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Slf4j
public class CountryServiceFallBackImpl implements CountryService {

    @Setter
    private Throwable cause;


    @Override
    public CountryVo getCountryByCode(String code) {
        log.error("getCountryByCode feign error", cause);
        return null;
    }

    @Override
    public CountryVo getCountryByApplyCode(String applyCode) {
        log.error("getCountryByApplyCode feign error", cause);
        return null;
    }

    @Override
    public List<CountryVo> findCountriesByApplyCodes(List<String> applyCodeList) {
        log.error("findCountriesByApplyCodes feign error", cause);
        return null;
    }

    @Override
    public List<CountryVo> findCountriesByNames(List<String> nameList) {
        log.error("findCountriesByNames feign error", cause);
        return null;
    }

    @Override
    public CountryVo getCountryByName(String name) {
        log.error("getCountryByName feign error", cause);
        return null;
    }

    @Override
    public List<CountryVo> findCountry(@RequestBody SysRequest<CountryDto> countryRequest) {
        log.error("findCountry feign error", cause);
        return null;
    }
}
